package com.tbit.config.datasource;

import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
import org.mybatis.spring.annotation.MapperScan;
import org.mybatis.spring.annotation.MapperScans;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * mybatis-plus配置类
 *
 * @Author:BUGTian
 * @DATE: 2022/8/23
 */
@Configuration
@MapperScans({
        @MapperScan("com.tbit.uqbike.webmanager.dao.core"),
        @MapperScan("com.tbit.uqbike.webmanager.dao.data"),
        @MapperScan("com.tbit.uqbike.webmanager.dao.history"),
        @MapperScan("com.tbit.uqbike.webmanager.dao.huge"),
        @MapperScan("com.tbit.uqbike.webmanager.dao.log"),
        @MapperScan("com.tbit.uqbike.webmanager.dao.stat"),
        @MapperScan("com.tbit.uqbike.webmanager.dao.ter"),
        @MapperScan("com.tbit.uqbike.webmanager.dao.capital"),
        @MapperScan("com.tbit.uqbike.webmanager.dao.sls"),
        @MapperScan("com.tbit.uqbike.webmanager.business.*.dao.*"),
        @MapperScan("com.tbit.uqbike.service.business.tag.dao"),
        @MapperScan("com.tbit.uqbike.compalint.mapper"),
})
public class MyBatisPlusConfig {
    @Bean
    public MybatisPlusInterceptor mybatisPlusInterceptor() {
        MybatisPlusInterceptor mybatisPlusInterceptor = new MybatisPlusInterceptor();
        mybatisPlusInterceptor.addInnerInterceptor(new PaginationInnerInterceptor());
        return mybatisPlusInterceptor;
    }

}
